package com.vdong.common.oauth.common.enums;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Component;

/**
 * @program: kpay-basics-srv
 * @description: 系统设置
 * @author: Mr.Zhang
 * @create: 2018-06-25 12:50
 **/
@Component
public class SystemSettings {
    public static String H5_LOGIN = "promote-dev.vdongzc.com";

    /**
     *  //后台管理登录页
     */
    public static String BACKEND_LOGIN = "zlftest.vdongzc.com/vue-web" ;

    /**
     * //后台管理url
     */
    @Value("${kpay.sys.setting.backend_domain}")
    public static String BACKEND_DOMAIN ;

    /**
     * //七牛云下载域名
     */
    @Value("${kpay.sys.setting.qiniu_domain}")
    public static String QINIU_DOMAIN ;

    /**
     *  //店铺账号默认密码
     */
    public static String BACKEND_ACCOUNT_DEFAULT_PWD ;

//    @Value("${kpay.sys.setting.backend_login}")
//    public void setBACKEND_LOGIN(String backendLogin) {
//        BACKEND_LOGIN = backendLogin;
//    }
//
//    @Value("${kpay.sys.setting.backend_domain}")
//    public void setBACKEND_DOMAIN(String backendDomain) {
//        BACKEND_DOMAIN = backendDomain;
//    }
//
//    @Value("${kpay.sys.setting.qiniu_domain}")
//    public void setQINIU_DOMAIN(String qiniuDomain) {
//        QINIU_DOMAIN = qiniuDomain;
//    }
//
//    @Value("${kpay.sys.setting.backend_account_default_pwd}")
//    public void setBACKEND_ACCOUNT_DEFAULT_PWD(String backendAccountDefaultPwd) {
//        BACKEND_ACCOUNT_DEFAULT_PWD = backendAccountDefaultPwd;
//    }

    @Bean
    private org.springframework.security.crypto.password.PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder(6);
    }
}
